﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RotateAround : MonoBehaviour
{
    public float speed=10f;
    public Transform around;

    // Update is called once per frame
    void Update()
    {
        if(around!=null)
        transform.RotateAround(around.position, new Vector3(0f, 0f, 1f), speed);
        else
            transform.RotateAround(transform.position,new Vector3(0,1,1),speed);
    }
}
